package com.zqx.sharestate.concretestate;

import com.zqx.sharestate.abstractstate.SwitchState;
import com.zqx.sharestate.context.Switch;
import lombok.extern.slf4j.Slf4j;

/**
 * description: 具体状态类
 * @author zqx
 * @date 2018/09/06
 */
@Slf4j
public class OnState extends SwitchState {
    @Override
    public void on(Switch s) {
        /*log.info("【打开状态类】已经打开");*/
        System.out.println("【打开状态类】已经打开");
    }

    @Override
    public void off(Switch s) {
        /*log.info("【打开状态类】关闭");*/
        System.out.println("【打开状态类】关闭");
        s.setState(Switch.getState("off"));

    }
}
